<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Demo1</title>
    <script src = vue.js> </script>
</head>
<body>
<div id="app">
    <input value="text" v-model="message">
    <p>请输入：{{message}}</p>
    <button v-on:click="add">添加</button>
    <ul><li v-for="item in numbers">{{item}}</li></ul>
</div>


<script>
    var m = new Vue({

        el:"#app",
        data:{
            message:"",
            numbers:[]
        },
        methods:{
            add() {
                this.numbers.push(this.message)
                this.message=""
            }
        }

    })
</script>
</body>

</html>